package cn.xiaopengstack.test.framework.mutilModel;

import cn.xiaopengstack.types.framework.strategy.link.mutilModel.ILogicLink;
import cn.xiaopengstack.types.framework.strategy.link.mutilModel.LinkArmory;
import lombok.Data;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class LinkMultiModelFactory {

    @Resource
    private Rule1 multiRule1;
    @Resource
    private Rule2 multiRule2;


    public ILogicLink<Object, DynamicContext, String> link(){
        LinkArmory<Object, DynamicContext, String> linkArmory = new LinkArmory<>("", multiRule1, multiRule2);
        return linkArmory.getLogicLink();
    };

    @Data
    public static class DynamicContext{
        private String number;
    }
}
